<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主界面</title>
<link rel="stylesheet" 
		href="${pageContext.request.contextPath}/themes/icon.css">
<link rel="stylesheet" 
		href="${pageContext.request.contextPath}/themes/bootstrap/easyui.css">
<script type="text/javascript" 
		src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript" 
		src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript" 
		src="${pageContext.request.contextPath}/js/easyui-lang-zh_CN.js"></script>
</head>
<script type="text/javascript">

	$(function () {
		
		$('#userRole').tree({    
		    url:'showRole',
		    onClick:function(node){
		    	
		    	if(node.attributes.furl){
		    		if($('#tabs').tabs('exists',node.text)){
		    			$('#tabs').tabs('select',node.text)
		    		}else {
		    			$('#tabs').tabs('add',{  
			    		    title:node.text, 
			    		    closable:true,
			    		    content:"<iframe  width='100%' height='100%' frameborder='0' src='"+node.attributes.furl+"'></iframe>",
			    		});
		    			
					}
		    		  
		    	}
		    }
		    
		}); 
		
		 
	})

</script>
<body class="easyui-layout">
    <div data-options="region:'west',title:'功能展示',split:true" style="width:300px;" >
    	<ul id="userRole"></ul>  
    </div>   
    <div data-options="region:'center',title:'数据展示'" style="padding:5px;background:#eee;">
    <div id="tabs" class="easyui-tabs" data-options="fit:true">   
   
      
	</div>  
    </div>   
    
    
</body>
</html>